package ord.csmz.xg2333.Example07;

public class Example07 {
    public static void main(String[] args){
        String id = "user";
        String time = "2025-05-19";
        String id_time = id.concat(time);
        System.out.println(id+","+time+"合并后的结果为："+id_time);
        System.out.println("截取"+id_time+"的第5个字符到第14个字符："+id_time.substring(4,13));
        System.out.print(time+"按-进行分割的结果为：");
        String[] list = time.split("-");
        for(int i=0;i<list.length;i++){
            if (i == list.length-1){                System.out.println(list[i]);
            }else{
                System.out.print(list[i]+",");
            }
        }
    }
}
